//
//  BaseViewController.h
//  KidReading
//
//  Created by telen on 14/12/10.
//  Copyright (c) 2014年 刘赞黄Telen. All rights reserved.
//

#import <UIKit/UIKit.h>
@class TABLE_BOOKS;
@class CountingActivity;
@interface BaseViewController : UIViewController<UIAlertViewDelegate,UIViewControllerTransitioningDelegate>
{
    CGFloat ratio_w;//资源转换倍率 短宽
    CGFloat ratio_h;//资源转换倍率 长高
    //
    CGFloat ratio_iPhone_w;
    //
    CGFloat width_short;
    CGFloat height_long;
    CGFloat width_my;
    CGFloat height_my;
}

@property(nonatomic,assign)UIInterfaceOrientationMask rotation;
@property(nonatomic,assign)UIInterfaceOrientation rotation_to;
@property(nonatomic,assign)UIInterfaceOrientation rotation_back;
@property(nonatomic,strong)NSString* tracPageName;
@property(nonatomic,assign)BOOL isGettingProduct;
@property (nonatomic, strong) CountingActivity *countActivity;

- (void)dealloc_My;

- (CGSize)forceToOrientation:(UIInterfaceOrientation)rotation;
- (void)forceOrientationTo:(UIInterfaceOrientation)rotation;

- (void)setMyRotationToVertical;
- (void)setMyRotationToHorizontal;
- (void)setMyRotationToAllMask;
- (BOOL)isRotationHorizontal:(UIInterfaceOrientation)rotation;

- (void)addBackView;
- (UIView*)newClickViewImage:(NSString*)imgStr Target:(id)target selecter:(SEL)selecter;
- (UIView*)newClickViewImage:(NSString*)imgStr Target:(id)target selecter:(SEL)selecter clickSize:(CGSize)size imgSize:(CGSize)sizeImg;
//
- (void)addSwipeBackGesture;
- (void)tapBack;
//
- (void)showAlertMsg:(NSString*)msg title:(NSString*)title;

//挂起恢复
- (void)applicationWillResignActive:(UIApplication *)application;
- (void)applicationDidEnterBackground:(UIApplication *)application;
- (void)applicationWillEnterForeground:(UIApplication *)application;
- (void)applicationDidBecomeActive:(UIApplication *)application;

- (void)refreshUI;
- (void)refreshData;
- (void)refreshNaviBar;
- (void)loaclCallPreRefresh;
@end


@interface BaseVCManager : NSObject
+ (void)registerBaseVC:(BaseViewController *)vc;
+ (void)unRegisterBaseVC:(BaseViewController *)vc;
+ (void)refreshAllBaseVCUI;
+ (void)refreshDataForAllBaseVC;
+ (void)localcallPreRefresh;
//
+ (void)refreshDataForAllBaseVCWithOutReadVC;
@end
